package cn.bs.busuo.mall.service.impl;

import cn.bs.busuo.mall.dao.persist.repository.ICategoryRepository;
import cn.bs.busuo.mall.pojo.vo.CategoryListVO;
import cn.bs.busuo.mall.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements ICategoryService {
    @Autowired
    ICategoryRepository categoryRepository;

    @Override
    public List<CategoryListVO> list() {
        return categoryRepository.list();
    }

    @Override
    public List<CategoryListVO> listByParent(Long parentId) {
        return categoryRepository.listByParent(parentId);
    }
}
